using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using TienTeTuong;
using log4net;
namespace TienTeTuong
{
    public class SponsorBUS
    {
        /// <summary>
        /// Get list sponsor, Get all if limit = 0 else get list sponsors with limited
        /// </summary>
        /// <param name="limit"></param>
        /// <returns></returns>
          public List<SponsorDTO> GeListSponsor(int limit)
        {
            var dao = new SponsorDAO();
            return dao.GeListSponsor(limit);
        }

          public List<SponsorDTO> GeListAllSponsor()
          {
              var dao = new SponsorDAO();
              return dao.GeListAllSponsor();
          }
          public SponsorDTO GetSponsorByID(string spID)
          {
              var dao = new SponsorDAO();
              return dao.GetSponsorByID(spID);
          }
          public List<SponsorDTO> searchCategoryDetailByName(string key)
          {
              var dao = new SponsorDAO();
              return dao.searchSponserByName(key);
          }
          public bool delete(string key)
          {
              var dao = new SponsorDAO();
              return dao.delete(key);
          }
          public bool update(SponsorDTO item)
          {
              var dao = new SponsorDAO();
              return dao.update(item);
          }

          public bool add(SponsorDTO item)
          {
              var dao = new SponsorDAO();
              return dao.add(item);
          }

    }
}
